#include <omp.h>


double integral_calc(const double param, Interval_t interval){
  double res = 0;
  double increase = (interval.sup - interval.inf) / (double) interval.increase_count;
  double x = interval.inf + 0.5 * increase;
  for(int i = 0; i < interval.increase_count; ++i){
    //std::cout << increase << " | " << x << "\n";
    res += integrand(x, param); 
    x += increase;
  }
  res *= increase;
  
  return res;
}
